Programming With QuickTime Sprites

| Previous | Chapter Contents | Chapter Top | Next |

Sprite Track Properties

In addition to defining properties for individual sprites, you can also define properties that apply to an entire sprite track. These properties may override default behavior or provide hints to the sprite media handler. The following sprite track properties are supported:

For wired sprites, which are discussed in Chapter 3, "Wired Sprites," of this programmer's guide, the following new sprite track properties are supported:

To specify sprite track properties, you create a single QT atom container and add a leaf atom for each property you want to specify. To add the properties to a sprite track, you call the new media handler function SetMediaPropertyAtom . To retrieve a sprite track's properties, you call the media handler function GetMediaPropertyAtom .

The sprite track properties and their corresponding atom data are outlined in Table 1-1 .

Table 1 Sprite track properties

Atom type

Atom ID

Leaf data type

kSpriteTrackPropertyBackgroundColor
1 RGBColor
kSpriteTrackPropertyOffscreenBitDepth
1 unsigned short
kSpriteTrackPropertySampleFormat
1 long
kSpriteTrackPropertyHasActions
1 Boolean
kSpriteTrackPropertyQTIdleEventsFrequency
1 UInt32
kSpriteTrackPropertyVisible
1 Boolean
kSpriteTrackPropertyScaleSpritesToScaleWorld
1 Boolean

When pasting portions of two different tracks together, the Movie Toolbox checks to see that all sprite track properties match. If, in fact, they do match, the paste results in a single sprite track instead of two.


© 1998 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |